﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ServBus.ListForm2010.Setup.SubForms
{
    public partial class EULAForm : BaseStepForm
    {
        public EULAForm()
        {
            InitializeComponent();
        }

        public EULAForm(BaseStepForm previous, SetupForm setupForm)
            : base(previous, setupForm)
        {
            InitializeComponent();
        }

        public override string Title
        {
            get
            {
                return Properties.Resources.EULATitle;
            }
        }

        public override string SubTitle
        {
            get
            {
                return Properties.Resources.EULASubTitle;
            }
        }

        public override void Init()
        {
            this.radioAccept.Text = Properties.Resources.EULAAccept;
            this.radioNotAccept.Text = Properties.Resources.EULANotAccept;
            this.richTextLicense.Rtf = Properties.Resources.EULA;
            this.ParentSetupForm.PrevButton.Enabled = true;
            this.ParentSetupForm.NextButton.Enabled = this.radioAccept.Checked;
        }

        protected void CheckRadio(object sender, EventArgs e)
        {
            this.ParentSetupForm.NextButton.Enabled = this.radioAccept.Checked;
        }

        public override BaseStepForm CreateNextStep()
        {
            return new CheckForm(this, this.ParentSetupForm);
        }
    }
}
